package com.semanticweb.webapp.model.admin;

import java.io.Serializable;

import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import javax.validation.constraints.Size;

/**
 * Entity class representing a user.
 * 
 * @author Srdjan Radulovic
 */
public class User implements Serializable {

    /**
     * serialVersionUID
     */
    private static final long serialVersionUID = 7904460940872624174L;

    /**
     * Primary key.
     */
    private Long id;

    /**
     * E-mail address of the user.
     */
    @NotNull
    @Pattern(regexp = ".+@.+\\..+", message = "Email address is not of proper format")
    private String email;

    /**
     * First name of the user.
     */
    @Size(min = 3, max = 10, message = "Firstname length is out of bounds")
    private String firstName;

    /**
     * Last name of the user.
     */
    @Size(min = 3, max = 20, message = "Lastname length is out of bounds")
    private String lastName;

    /**
     * @return id
     */
    public Long getId() {
        return id;
    }

    /**
     * @param id
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @return email
     */
    public String getEmail() {
        return email;
    }

    /**
     * @param email
     */
    public void setEmail(String email) {
        this.email = email;
    }

    /**
     * @return firstName
     */
    public String getFirstName() {
        return firstName;
    }

    /**
     * @param firstName
     */
    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    /**
     * @return lastName
     */
    public String getLastName() {
        return lastName;
    }

    /**
     * @param lastName
     */
    public void setLastName(String lastName) {
        this.lastName = lastName;
    }
}
